//
// Created by PengYH on 2024/7/18.
//

#ifndef CMAKE_SAMPLE_SRC_TEST_TEST_JSON2STRUCT_AI_PARAM_DEFINE_H_
#define CMAKE_SAMPLE_SRC_TEST_TEST_JSON2STRUCT_AI_PARAM_DEFINE_H_

#include <string>
#include <vector>
#include "AIGCJson.hpp"

namespace ai {
class CMDReq {
 public:
  std::string module;
  std::string type;

  AIGC_JSON_HELPER(module, type)
};

class CMDResp {
 public:
  std::string type;
  int32_t state;
  std::string err_msg;

  AIGC_JSON_HELPER(type, state, err_msg)
};

/// 获取停车场编号
class CMDResp_GetAlgParkingIdentifier {
 public:
  std::string type;
  int32_t state;
  std::string err_msg;
  class {
   public:
    std::string identifier;

    AIGC_JSON_HELPER(identifier)
  } body;

  AIGC_JSON_HELPER(type, state, err_msg, body)
};

/// 设置停车场编号
class CMDReq_SetAlgParkingIdentifier {
 public:
  std::string module;
  std::string type;
  class {
   public:
    std::string identifier;

    AIGC_JSON_HELPER(identifier)
  } body;

  AIGC_JSON_HELPER(module, type, body)
};

/// 获取车位模式属性
class CMDResp_GetAlgParkModeProp {
 public:
  class Mode {
   public:
    int32_t mode;
    std::string content;

    AIGC_JSON_HELPER(mode, content)
  };
  class Body {
   public:
    std::vector<Mode> modes;
    AIGC_JSON_HELPER(modes)
  };

 public:
  std::string type;
  int32_t state;
  std::string err_msg;
  Body body;

  AIGC_JSON_HELPER(type, state, err_msg, body)
};

/// 获取车位模式
class CMDResp_GetAlgParkModePrm {
 public:
  std::string type;
  int32_t state;
  std::string err_msg;
  class Body {
   public:
    int32_t mode;      // 车位模式；0=一字车位；1=垂直车位；2=斜向车位
    int32_t park_num;  // 支持车位数量
    AIGC_JSON_HELPER(mode, park_num)
  } body;

  AIGC_JSON_HELPER(type, state, err_msg, body)
};

/// 设置车位模式
class CMDReq_SetAlgParkModePrm {
 public:
  std::string module;
  std::string type;
  class Body {
   public:
    int32_t mode;      // 车位模式；0=一字车位；1=垂直车位；2=斜向车位
    int32_t park_num;  // 支持车位数量
    AIGC_JSON_HELPER(mode, park_num)
  } body;

  AIGC_JSON_HELPER(module, type, body)
};

}

#endif //CMAKE_SAMPLE_SRC_TEST_TEST_JSON2STRUCT_AI_PARAM_DEFINE_H_
